//链表遍历框架，　迭代和递归
#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
using namespace std;

class ListNote{
    public:
        int val;
        ListNote *next;
};

void travelse(ListNote head){
    for(ListNote p = head; p !=NULL; p = p.next ){
        //迭代访问
    }
}

void traveles(ListNote head){
    travelse(head.next);
    //递归访问
}

//二叉树遍历结构

class TreeNote{
    public:
    int val;
    TreeNote *left,*right;
};

void travetree(TreeNote root){
    travetree(root.left);
    travetree(root.right);
}

//扩展为Ｎ叉树遍历框架
class NTreeNote{
    public:
        int val;
        NTreeNote chiledren[];
};

void treavse(NTreeNote head){
    for(NTreeNote child : head.children){
        treavse(child)
    }
}







